/**
 * created by 小卷毛, 2020/9/24
 * Copyright (c) 2020, 416143467@qq.com All Rights Reserved.
 * #                   *********                            #
 * #                  ************                          #
 * #                  *************                         #
 * #                 **  ***********                        #
 * #                ***  ****** *****                       #
 * #                *** *******   ****                      #
 * #               ***  ********** ****                     #
 * #              ****  *********** ****                    #
 * #            *****   ***********  *****                  #
 * #           ******   *** ********   *****                #
 * #           *****   ***   ********   ******              #
 * #          ******   ***  ***********   ******            #
 * #         ******   **** **************  ******           #
 * #        *******  ********************* *******          #
 * #        *******  ******************************         #
 * #       *******  ****** ***************** *******        #
 * #       *******  ****** ****** *********   ******        #
 * #       *******    **  ******   ******     ******        #
 * #       *******        ******    *****     *****         #
 * #        ******        *****     *****     ****          #
 * #         *****        ****      *****     ***           #
 * #          *****       ***        ***      *             #
 * #            **       ****        ****                   #
 */
package com.sgcc.pda.lib_tools_database.factory;

import com.sgcc.pda.lib_tools_database.bean.other.RiskHttpState;
import com.sgcc.pda.lib_tools_database.gen.DaoSession;
import com.sgcc.pda.lib_tools_database.gen.RiskHttpStateDao;

/**
 * 描 述：
 * 作 者：小卷毛  2020-09-24 15:37
 * 修改描述：
 * 修 改 人：
 * 修改版本：
 */
public class RiskHttpStateImpl extends Abstractable<RiskHttpState, RiskHttpStateDao> {

    @Override
    public RiskHttpStateDao getDao(DaoSession session) {
        return session.getRiskHttpStateDao();
    }

    /**
     * 插入网络待提交风险取证数据
     *
     * @param appNo  工单号
     * @param planNo 工作计划编号
     * @param wtNo   工作票F编号
     */
    public void insertData(
            String appNo,
            String planNo,
            String wtNo
    ) {
        RiskHttpState data = new RiskHttpState();
        data.setRecordId(appNo + planNo + wtNo);
        data.setContent(appNo + "," + planNo + "," + wtNo);

        insert(data);
    }

    /**
     * 查询本地未上传数据数量
     */
    public int queryCount() {
        return (int) mCommonDaoUtils.queryCount();
    }

}
